/*
 ============================================================================
 Name		: AutoOrderProcessAppView.cpp
 Author	  : lin.chaoming
 Copyright   : do1
 Description : Application view implementation
 ============================================================================
 */

// INCLUDE FILES
#include <coemain.h>
#include "AutoOrderProcessAppView.h"

// ============================ MEMBER FUNCTIONS ===============================

// -----------------------------------------------------------------------------
// CAutoOrderProcessAppView::NewL()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CAutoOrderProcessAppView* CAutoOrderProcessAppView::NewL( const TRect& aRect)
{
    CAutoOrderProcessAppView* self = CAutoOrderProcessAppView::NewLC(aRect);
    CleanupStack::Pop(self);
    return self;
}

// -----------------------------------------------------------------------------
// CAutoOrderProcessAppView::NewLC()
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
CAutoOrderProcessAppView* CAutoOrderProcessAppView::NewLC( const TRect& aRect)
{
    CAutoOrderProcessAppView* self = new (ELeave) CAutoOrderProcessAppView;
    CleanupStack::PushL(self);
    self->ConstructL(aRect);
    return self;
}

// -----------------------------------------------------------------------------
// CAutoOrderProcessAppView::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CAutoOrderProcessAppView::ConstructL( const TRect& aRect)
{
    // Create a window for this application view
    CreateWindowL();

    // Set the windows size
    SetRect(aRect);

    // Activate the window, which makes it ready to be drawn
    ActivateL();
}

// -----------------------------------------------------------------------------
// CAutoOrderProcessAppView::CAutoOrderProcessAppView()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CAutoOrderProcessAppView::CAutoOrderProcessAppView()
{
    // No implementation required
}

// -----------------------------------------------------------------------------
// CAutoOrderProcessAppView::~CAutoOrderProcessAppView()
// Destructor.
// -----------------------------------------------------------------------------
//
CAutoOrderProcessAppView::~CAutoOrderProcessAppView()
{
    // No implementation required
}

// -----------------------------------------------------------------------------
// CAutoOrderProcessAppView::Draw()
// Draws the display.
// -----------------------------------------------------------------------------
//
void CAutoOrderProcessAppView::Draw( const TRect& /*aRect*/) const
{
    // Get the standard graphics context
    CWindowGc& gc = SystemGc();

    // Gets the control's extent
    TRect drawRect(Rect());

    // Clears the screen
    gc.Clear(drawRect);

}

// -----------------------------------------------------------------------------
// CAutoOrderProcessAppView::SizeChanged()
// Called by framework when the view size is changed.
// -----------------------------------------------------------------------------
//
void CAutoOrderProcessAppView::SizeChanged()
{
    DrawNow();
}

// -----------------------------------------------------------------------------
// CAutoOrderProcessAppView::HandlePointerEventL()
// Called by framework to handle pointer touch events.
// Note: although this method is compatible with earlier SDKs, 
// it will not be called in SDKs without Touch support.
// -----------------------------------------------------------------------------
//
void CAutoOrderProcessAppView::HandlePointerEventL(
        const TPointerEvent& aPointerEvent)
{

    // Call base class HandlePointerEventL()
    CCoeControl::HandlePointerEventL(aPointerEvent);
}

// End of File
